//
//  RTVLabelChangeVC.m
//  AutoLayoutTest
//
//  Created by leoliu on 14-10-13.
//  Copyright (c) 2014年 evangel. All rights reserved.
//

#import "RTVLabelChangeVC.h"

@interface RTVLabelChangeVC ()

@property (nonatomic, strong) IBOutlet UILabel *labelA;

@property (nonatomic, strong) IBOutlet UILabel *labelB;

- (IBAction)pressAction:(id)sender;

@property (nonatomic, strong) NSArray *arr;

@end

@implementation RTVLabelChangeVC

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
    
    _arr = @[
            @"武林风就算了快捷方式零度空间发牢骚开发建设了",
            @"诗酒风流收看大发牢骚都看过了四度空间干啥了大驾光临撒就更少了第几个啦时间过了客家山歌流口水就改了伤筋动骨精神分裂打飞机撒李开复激昂苏联发科激昂苏理发卡",
            @"skjflskdfjldkfsldkfjwoeijlkfjsdifjiewjflskdjfleifjlsslkjfsldkfjklsadfjaslfjalskjflaskfjalsfjaslkfjalfkajflasjflaksfjalskdfjalskdfjalsdfjalsdfjalskfjalskdjfalskdjflaskdfjalsfjalsfdjalsdfkjaldfkjalsfkajslfajlf",
            @"我了去流口水江东父老收看江东父老时间过了手机卡了顶尖高手了；按道理噶快上两个；奥斯卡当里个当考试结束来电管家萨拉丁开工建设来电管家阿拉山口多个"
            ];
    
    _labelA.text = _arr[0];
    _labelB.text = _arr[1];
    NSLog(@"labelA height = %f",_labelA.bounds.size.height);
    NSLog(@"labelB height = %f",_labelB.bounds.size.height);
    
    
    // Do any additional setup after loading the view.
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


- (IBAction)pressAction:(id)sender
{
    int a = arc4random()%_arr.count;
    NSString *str = _arr[a];
    NSString *strB = _arr[(a+1)%_arr.count];
    _labelA.text = str;
    _labelB.text = strB;
    NSLog(@"labelA height = %f",_labelA.bounds.size.height);
    NSLog(@"labelB height = %f",_labelB.bounds.size.height);
}
/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
